#pragma once

#include <string>
#include <memory>

class BaseMsgReporter;
using BaseMsgReporterPtr = std::shared_ptr<BaseMsgReporter>;

class BaseMsgReporter
{
public:
    BaseMsgReporter() = default;
    virtual ~BaseMsgReporter() = default;

    virtual bool Init(){return true;}

    std::string GetMsgType();
    int GetMsgLength();
    void SetTimeInterval(int Hz);
    int GetTimeInterval();

    virtual std::string GetReportMsg() = 0;

protected:
    void SetMsgInfo(const std::string& msgType, int msgLength);

protected:
    std::string m_msgType;                  // msg type
    int m_msgLength;                        // msg length

    int m_timeInterval = 0;                 // 消息上报的间隔，单位毫秒。  消息上报的频率，比如10Hz表示，1秒钟发送10次，那么转换成时间间隔就是100ms
};